using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.SqlServer.Management.Smo;

using Microsoft.SqlServer.Management.Common;
using System.Collections;

namespace Quanly_dethi.Class
{
    class ketnoi
    {
        private Server _server;

        public Server _Server
        {
            get { return _server; }
            set { _server = value; }
        }

        public ketnoi()
        {
            ServerConnection serverCon = new ServerConnection();
            serverCon.LoginSecure = false;
            serverCon.ServerInstance = ".";
            serverCon.Login = "sa";
            serverCon.Password = "sa";
            _server = new Server(serverCon);
        }
        public ketnoi(string servername, string user, string pass)
        {
            ServerConnection serverCon = new ServerConnection();
            serverCon.LoginSecure = false;
            serverCon.ServerInstance = servername;
            serverCon.Login = user;
            serverCon.Password = pass;
            _server = new Server(serverCon);
        }
    }
}
